<%= form_for(@user) do |f| %>
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= t("activerecord.errors.template.header", :model => User.model_name.human, :count => @user.errors.count) %></h2>

      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :username %><br/>
    <%= f.text_field :username %>
  </div>
  <div class="field">
    <%= f.label :password %><br/>
    <%= f.password_field :password %>
  </div>
  <% unless @no_password_confirmation_in_view %>
  <div class="field">
    <%= f.label :password_confirmation %><br/>
    <%= f.password_field :password_confirmation %>
  </div>
  <% end %>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
